﻿using System.Collections.Generic;
using TicketReservationSystem.Common.Entities;

namespace TicketReservationSystem.Common.Interfaces
{
    public interface IDataAccess
    {
        #region Flight Management

        bool Exists(City city);
        bool Exists(Airport airport);
        bool Exists(Airline airline);
        bool Exists(Plane plane);
        bool Exists(Flight flight);
        bool Exists(Customer customer);
        bool Exists(Reservation reservation);

        void Add(City city);
        void Add(Airport airport);
        void Add(Airline airline);
        void Add(Plane plane);
        void Add(Flight flight);
        void Add(Customer customer);
        void Add(Reservation reservation);

        void Remove(City city);
        void Remove(Airport airport);
        void Remove(Airline airline);
        void Remove(Plane plane);
        void Remove(Flight flight);
        void Remove(Customer customer);
        void Remove(Reservation reservation);

        void RemoveAllRelatedFlights(Airport airport);
        void RemoveAllRelatedFlights(Plane plane);
        void RemoveAllRelatedReservations(Flight flight);
        void RemoveAllRelatedReservations(Customer customer);

        City GetCityByID(int id);
        Airport GetAirportByID(int id);
        Airline GetAirlineByID(int id);
        Plane GetPlaneByID(int id);
        Flight GetFlightByID(int id);
        Customer GetCustomerByID(int id);
        Reservation GetReservationByID(int id);

        IList<City> AllCities();
        IList<Airport> AllAirports();
        IList<Airline> AllAirlines();
        IList<Plane> AllPlanes();
        IList<Flight> AllFlights();
        IList<Customer> AllCustomers();
        IList<Reservation> AllReservations();
        IList<Airport> AllAirportsInCity(City city);
        IList<Plane> AllPlanesInAirline(Airline airline); 

        #endregion

        #region Flight Search

        #endregion

        #region Utils

        void InitializeDataBase();
        void DropTables();

        #endregion
    }
}
